package com.ai.module.business.controller;

import com.ai.module.chat.common.ano.NoAuth;
import com.ai.module.business.domain.req.BusinessTotalReq;
import com.ai.module.business.domain.vo.BusinessTotalVo;
import com.ai.module.business.service.BusinessTotalService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: MrHe
 * @create: 2024-01-25 02:13
 * @description:
 **/

@RestController
@RequestMapping("/comment/business")
@Api(tags = "通用业务", description = "点赞,收藏等")
public class BusinessTotalController {

    @Autowired
    private BusinessTotalService businessTotalService;

    @PostMapping
    @NoAuth
    @ApiOperation("查询当前图片的 点赞 收藏 总数信息,不登录仅可查看")
    BusinessTotalVo findBusiness(@RequestBody BusinessTotalReq businessTotalReq) {
        return businessTotalService.findBusiness(businessTotalReq);
    }

    @PostMapping("/collectLike")
    @ApiOperation("用户点赞 收藏")
    void collectLike(@RequestBody BusinessTotalReq businessTotalReq) {
        businessTotalService.collectLike(businessTotalReq);
    }


}
